@push('title')
    <title>恒博同程普通政策修改</title>
@endpush
@push("style2")
    <style>

        form .split-header {
            line-height: 24px;
            font-size: 15px;
            color: #757575;
            padding-left: 6px;
            padding-bottom: 6px;
            font-weight: 700;
        }

        form .split-body {
            box-shadow: 0px 0px 8px 0px #d2d2d2;
            border-radius: 5px;
        }

        form .split-left {
            padding-right: 15px;
        }

        form .split-text {
            float: left;
            line-height: 50px;
            font-size: 14px;
            font-weight: 700;
            text-align: left;
            position: relative;
            left: 15px;
            color: #757575;
            margin-top: -8px
        }

        .layui-form-item {
            /*margin-right: 300px;*/
            margin-bottom: 10px;
        }

        .layui-form-item .layui-input-inline {
            margin-right: -5px;
        }

        .layui-form-label {
            width: 130px;
        }

        /* 底部边框 */
        .input-bottom {
            border: none;
            border-bottom: 1px dashed #e6e6e6;
            outline: none;
            color: #9d9d9d;
            background: none;
        }

        input[disabled] {
            background-color: transparent;
            color: inherit; /* 保持文字颜色不变 */
            cursor: not-allowed; /* 设置鼠标指针为禁止点击状态 */
        }

        .layui-form-mid {
            color: #9d9d9d;
            padding: 0px 0 !important;
        }

        .layui-textarea, .layui-input {
            border-radius: 4px !important;
            height: 34px;
        }

        .layui-textarea {
            min-height: 50px;
        }

        .piece {
            font-size: 14px;
            margin-top: 15px;
            margin-bottom: 15px;
            box-shadow: 0px 0px 8px 0px #d2d2d2; /* 模拟微醺边框效果 */
            border-radius: 5px; /* 可选，为div添加圆角 */
        }

        .pata-item {
            display: none;
        }

        .back-item {
            display: none;
        }

        .ant-form-explain {
            clear: both;
            color: rgba(0, 0, 0, .45);
            font-size: 14px;
            line-height: 1.5;
            margin-top: 10px;
            margin-left: 160px;
            min-height: 22px;
            transition: color .3s cubic-bezier(.215, .61, .355, 1);
        }

        /*设置隐藏秒列*/
        /* 设置只展示时分，隐藏秒那一列 */
        .laydate-time-list {
            padding-bottom: 0px;
            overflow: hidden;
        }

        .laydate-time-list > li {
            width: 50% !important;
        }

        .laydate-time-list > li:last-child {
            display: none;
        }

        .laydate-time-list ol li {
            width: 100% !important;
            padding-left: 12px !important;
            text-align: left !important;
        }

    </style>
@endpush
@extends('layout.layer')
@section('content')
    <form class="layui-form" action="#" lay-filter="first">
        <input type="hidden" name="_token" value="{{csrf_token()}}">
        <input type="hidden" name="platform" value="40">
        <input type="hidden" name="id" value="{{$policy['id']}}">
        <input type="hidden" name="policyId" value="{{$policy['policyId']}}">
        <div class="split-header">修改普通政策</div>

        <div class="split-body">
            <div class="layui-row" style="padding: 0px 18px">
                <div class="layui-col-xs6 split-left">
                    <!--政策信息-->
                    <div class="piece">
                        <div class="split-text">政策信息</div>
                        <hr>
                        <div class="layui-form-item">
                            <label class="layui-form-label layui-required">政策代码</label>
                            <div class="layui-input-inline">
                                <input disabled type="text" name="policyCode" value="{{$policy['policyCode']}}" lay-verify="required" lay-reqText=""
                                       placeholder="字母、数字、中文或者_" autocomplete="off" class="layui-input" style="width: 200px">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">政策代码扩展</label>
                            <div class="layui-input-inline">
                                <input disabled type="text" name="policyCodeExtend" value="{{$policy['policyCodeExtend']}}" lay-verify="" lay-reqText=""
                                       placeholder="字母、数字、中文或者_" autocomplete="off" class="layui-input" style="width: 200px">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">是否有效</label>
                            <div class="layui-input-block">
                                <input disabled type="radio" name="isValid" value="0" @if($policy['isValid'] == '0') checked @endif title="否">
                                <input disabled type="radio" name="isValid" value="1" @if($policy['isValid'] == '1') checked @endif title="是">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">是否共享航班</label>
                            <div class="layui-input-block">
                                <input disabled type="radio" name="isApplyShareFlight" value="0" @if($policy['isApplyShareFlight'] == '0') checked @endif title="否" lay-filter="isApplyShareFlight">
                                <input disabled type="radio" name="isApplyShareFlight" value="1" @if($policy['isApplyShareFlight'] == '1') checked @endif title="是" lay-filter="isApplyShareFlight">
                            </div>
                        </div>
                        <div class="layui-form-item" id="carryVerifyCabinPriceDiv" style="display: none">
                            <label class="layui-form-label">是否出主承运</label>
                            <div class="layui-input-block">
                                <input disabled type="radio" name="carryVerifyCabinPrice" value="0" @if($policy['carryVerifyCabinPrice'] == '0') checked @endif title="否" lay-filter="carryVerifyCabinPrice">
                                <input disabled type="radio" name="carryVerifyCabinPrice" value="1" @if($policy['carryVerifyCabinPrice'] == '1') checked @endif title="是" lay-filter="carryVerifyCabinPrice">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">是否代订位</label>
                            <div class="layui-input-block">
                                <input disabled type="radio" name="isAgentBooking" value="0" @if($policy['isAgentBooking'] == '0') checked @endif title="否" lay-filter="isAgentBooking">
                                <input disabled type="radio" name="isAgentBooking" value="1" @if($policy['isAgentBooking'] == '1') checked @endif title="是" lay-filter="isAgentBooking">
                            </div>
                        </div>
                        <div class="layui-form-item" id="agentBookFailTypeDiv" style="display: none">
                            <label class="layui-form-label">订位失败处理</label>
                            <div class="layui-input-block">
                                <input disabled type="radio" name="agentBookFailType" value="0" @if($policy['agentBookFailType'] == '0') checked @endif title="否" title="拦截下单" lay-filter="agentBookFailType">
                                <input disabled type="radio" name="agentBookFailType" value="1" @if($policy['agentBookFailType'] == '1') checked @endif title="否" title="收单" lay-filter="agentBookFailType">
                            </div>
                            <div class="layui-form-mid" id="agentBookFailTypeTip" style="left: -70px">占编失败率一旦达到平台约束上限,代订位资源将禁售</div>
                        </div>
                        <div class="layui-form-item" id="seatLimitDiv" style="display: none">
                            <label class="layui-form-label">AV余位阈值</label>
                            <div class="layui-col-md3">
                                <input disabled type="number" step="1" min="0" max="9" name="seatLimit" required value="{{$policy['seatLimit']}}" required placeholder="" lay-affix="number" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">改签代订位余位阈值</label>
                            <div class="layui-col-md3">
                                <input disabled type="number" step="1" min="0" max="10" name="rebookSeatLimit" required value="{{$policy['rebookSeatLimit']}}" placeholder="" lay-affix="number" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item" id="avEffectiveSaleValueDiv">
                            <label class="layui-form-label">AV大于此值可售</label>
                            <div class="layui-col-md3">
                                <input disabled type="number" step="1" min="0" max="9" name="avEffectiveSaleValue" required value="{{$policy['aVEffectiveSaleValue']}}" placeholder="" lay-affix="number" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">报销类型</label>
                            <div class="layui-input-block">
                                <input disabled type="radio" name="reimbursementType" value="0" @if($policy['reimbursementType'] == '0') checked @endif title="行程单" lay-filter="reimbursementType">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">订位office号</label>
                            <div class="layui-input-inline">
                                <select disabled name="officeNo" lay-filter="officeNo">
                                    <option value="">请选择</option>
                                    <option value="CGO134" @if($policy['officeNo'] == 'CGO134') selected @endif>CGO134</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">客票验证office号</label>
                            <div class="layui-input-inline">
                                <select disabled name="analyzeTicketOfficeNo" lay-filter="analyzeTicketOfficeNo">
                                    <option value="">请选择</option>
                                    <option value="CGO134" @if($policy['analyzeTicketOfficeNo'] == 'CGO134') selected @endif>CGO134</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">大客户代码</label>
                            <div class="layui-input-inline">
                                <input disabled type="text" name="bigClientCode" value="{{$policy['bigClientCode']}}" lay-verify="" lay-reqText=""
                                       placeholder="请输入大客户代码" autocomplete="off" class="layui-input" style="width: 200px">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">资源适用场景</label>
                            <div class="layui-input-inline" style="padding-bottom: 8px">
                                <div id="resourceApplySceneList" style="width: 200px;"></div>
                            </div>
                        </div>
                    </div>
                    <!--行程信息-->
                    <div class="piece">
                        <div class="split-text">行程信息</div>
                        <hr>

                        <div class="layui-form-item">
                            <label class="layui-form-label layui-required">行程类型</label>
                            <div class="layui-input-block">
                                <input disabled type="radio" name="tripType" value="1" title="单程" checked>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label layui-required">航司（出票）</label>
                            <div class="layui-input-inline">
                                <input disabled type="text" name="airCompany" value="{{$policy['airCompany']}}" lay-verify="required|uppercase" maxlength="2" lay-reqText="航空公司不能为空"
                                       lay-filter="airCompany" placeholder="" autocomplete="off" class="layui-input" style="width: 200px">
                            </div>
                        </div>

                        <div class="layui-form-item" id="carryAirCompanyDiv" style="display: none">
                            <label class="layui-form-label layui-required">主承运航司</label>
                            <div class="layui-input-inline">
                                <input disabled type="text" id="carryAirCompany" name="carryAirCompany" value="{{$policy['carryAirCompany']}}" lay-verify="" maxlength="2" lay-reqText=""
                                       lay-filter="carryAirCompany" placeholder="" autocomplete="off" class="layui-input" style="width: 200px">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label layui-required">出发机场</label>
                            <div class="layui-input-inline">
                                <input disabled type="text" name="startPort" value="{{$policy['startPort']}}" lay-verify="required" maxlength="3" lay-verify="" lay-reqText="出发机场不能为空"
                                       lay-filter="startPort" placeholder="" autocomplete="off" class="layui-input" style="width: 200px">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label layui-required">抵达机场</label>
                            <div class="layui-input-inline">
                                <input disabled type="text" name="endPort" value="{{$policy['endPort']}}" lay-verify="required" maxlength="3" lay-verify="" lay-reqText="抵达机场不能为空"
                                       lay-filter="endPort" placeholder="" autocomplete="off" class="layui-input" style="width: 200px">
                            </div>
                        </div>

                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">不适用航线</label>
                            <div class="layui-input-inline" style="width: 280px;">
                                <textarea disabled placeholder="请输入不适用航线，格式：PEKSHA,SHAPEK" rows="" maxlength="" class="layui-textarea" style="" lay-verify="" lay-reqText="" name="cabinNote" value=""></textarea>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">适用航班号</label>
                            <div class="layui-input-block">
                                <input disabled type="radio" name="flightNoFit" value="0" @if($policy['flightNoFit'] == '0') checked @endif title="不限制" lay-filter="flightNoFit">
                                <input disabled type="radio" name="flightNoFit" value="1" @if($policy['flightNoFit'] == '1') checked @endif title="仅适用以下航班" lay-filter="flightNoFit">
                                <input disabled type="radio" name="flightNoFit" value="2" @if($policy['flightNoFit'] == '2') checked @endif title="不适用以下航班" lay-filter="flightNoFit">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label"></label>
                            <div class="layui-input-block">
                                <input disabled type="text" id="flightNoList" name="flightNoList" value="@if(!empty($policy['flightNoList'])){{implode(',', $policy['flightNoList'])}}@endif" title="不限制" lay-verify="" lay-reqText=""
                                       placeholder="可输入多项,以“,”分割" autocomplete="off" class="layui-input" style="width: 200px">

                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label layui-required">适用班期</label>
                            <div class="layui-input-block layui-input-wrap">
                                <a href="#" id="flight-week-all" style="color: #1976d2;">全选</a>&nbsp;&nbsp;
                                <a href="#" id="flight-week-invert" style="color: #1976d2">反选</a>
                            </div>
                        </div>

                        <div class="layui-form-item" style="margin-top: -16px">
                            <label class="layui-form-label"></label>
                            <div class="layui-input-block" id="DaysFDiv" style="width: 500px;" lay-verify="" lay-reqText="请选择适用班期">
                                <input disabled type="checkbox" name="weekSegmentList[]" lay-filter="flightDay" value="1" @if(in_array(1,$policy['weekSegmentList'])) checked @endif title="1">
                                <input disabled type="checkbox" name="weekSegmentList[]" lay-filter="flightDay" value="2" @if(in_array(2,$policy['weekSegmentList'])) checked @endif title="2">
                                <input disabled type="checkbox" name="weekSegmentList[]" lay-filter="flightDay" value="3" @if(in_array(3,$policy['weekSegmentList'])) checked @endif title="3">
                                <input disabled type="checkbox" name="weekSegmentList[]" lay-filter="flightDay" value="4" @if(in_array(4,$policy['weekSegmentList'])) checked @endif title="4">
                                <input disabled type="checkbox" name="weekSegmentList[]" lay-filter="flightDay" value="5" @if(in_array(5,$policy['weekSegmentList'])) checked @endif title="5">
                                <input disabled type="checkbox" name="weekSegmentList[]" lay-filter="flightDay" value="6" @if(in_array(6,$policy['weekSegmentList'])) checked @endif title="6">
                                <input disabled type="checkbox" name="weekSegmentList[]" lay-filter="flightDay" value="7" @if(in_array(7,$policy['weekSegmentList'])) checked @endif title="7">
                            </div>
                            <div id="DaysCheck" class="ant-form-explain" style="color: red;" >请选择</div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label layui-required">适用舱位</label>
                            <div class="layui-input-inline">
                                <input disabled type="text" name="cabinCodeList" value="{{implode(',',$policy['cabinCodeList'])}}" lay-verify="required" lay-reqText="适用舱位不能为空"
                                       placeholder="可填多个舱位,以“,”分割" autocomplete="off" class="layui-input" style="width: 200px">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label layui-required">航班开始日期</label>
                            <div class="layui-input-inline" id="flight-date-s" style="width: 500px;">
                                <div class="layui-input-inline layui-input-wrap">
                                    <div class="layui-input-prefix">
                                        <i class="layui-icon layui-icon-date"></i>
                                    </div>
                                    <input disabled type="text" name="startDate" value="{{$policy['startDate']}}" autocomplete="off" id="flight-start"
                                           lay-verify="required|title" class="layui-input" placeholder="选择日期">
                                </div>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label layui-required">航班结束日期</label>
                            <div class="layui-input-inline" id="flight-date-e" style="width: 500px;">
                                <div class="layui-input-inline layui-input-wrap">
                                    <div class="layui-input-prefix">
                                        <i class="layui-icon layui-icon-date"></i>
                                    </div>
                                    <input disabled type="text" name="endDate" value="{{$policy['endDate']}}" autocomplete="off" id="flight-end"
                                           lay-verify="required|title" class="layui-input" placeholder="选择日期">
                                </div>
                            </div>
                        </div>

                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">不适用航班日期</label>
                            <div class="layui-input-inline" style="width: 280px;">
                                <textarea disabled placeholder="请输入不适用航班日期，格式：2021-06-01/2021-06-10,2021-07-01/2021-07-10" name="notFlightDate" rows="" maxlength="" class="layui-textarea" style="" lay-verify="" lay-reqText="">@if(!empty($policy['notFlightDate'])){{$policy['notFlightDate']}}@endif</textarea>
                            </div>
                        </div>

                        <div class="layui-form-item layui-form-text" style="margin-bottom: 20px">
                            <label class="layui-form-label">起飞适用时间</label>
                            <div class="layui-input-inline" style="width: 280px;margin-bottom: 15px">
                                <textarea disabled placeholder="请输入起飞适用时间，格式：00:00-10:00,12:00-20:00"  name="applyTimeRangeSegment" rows="" maxlength="" class="layui-textarea" style="" lay-verify="" lay-reqText="">@if(!empty($policy['applyTimeRangeSegment'])){{$policy['applyTimeRangeSegment']}}@endif</textarea>
                            </div>
                        </div>

                    </div>
                </div>
                <div class="layui-col-xs6">
                    <!--销售信息-->
                    <div class="piece">
                        <div class="split-text">销售信息</div>
                        <hr>

                        <div class="layui-form-item">
                            <label class="layui-form-label layui-required">销售开始日期</label>
                            <div class="layui-input-inline" id="sale-date" style="width: 200px;">
                                <div class="layui-input-inline layui-input-wrap">
                                    <div class="layui-input-prefix">
                                        <i class="layui-icon layui-icon-date"></i>
                                    </div>
                                    <input disabled type="text" name="startSellDate" value="@if(!empty($policy['startSellDate'])){{substr($policy['startSellDate'],0,10)}}@endif" autocomplete="off" id="sale-start"
                                           lay-verify="required|title" class="layui-input" placeholder="选择日期">
                                </div>
                            </div>

                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label layui-required">销售结束日期</label>
                            <div class="layui-input-inline" id="sale-date" style="width: 200px;">
                                <div class="layui-input-inline layui-input-wrap">
                                    <div class="layui-input-prefix">
                                        <i class="layui-icon layui-icon-date"></i>
                                    </div>
                                    <input disabled type="text" name="endSellDate" value="@if(!empty($policy['endSellDate'])){{substr($policy['endSellDate'],0,10)}}@endif" autocomplete="off" id="sale-end"
                                           lay-verify="required|title" class="layui-input" placeholder="选择日期">
                                </div>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">N天内</label>
                            <div class="layui-input-inline" id="N-date-in" style="width: 200px;">
                                <div class="layui-input-inline layui-input-wrap">
                                    <input disabled type="number" step="1" min="0" max="365" name="startSaleDay" value="@if(empty($policy['startSaleDay'])){{0}}@elseif(!empty($policy['startSaleDay'])){{$policy['startSaleDay']}}@endif" required
                                           placeholder="" lay-verify="number" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-mid" style="left: 0px;color: #000;padding: 8px 0 !important;margin-right:3px">天</div>
                            <div class="layui-input-inline" style="width: 200px;">
                                <div class="layui-input-inline layui-input-wrap">
                                    <div class="layui-input-prefix">
                                        <i class="layui-icon layui-icon-time"></i>
                                    </div>
                                    <input disabled type="text" class="layui-input" id="NDateInTime" name="startSaleTime" value="@if(empty($policy['startSaleTime'])){{'00:00'}}@elseif(!empty($policy['startSaleTime'])){{$policy['startSaleTime']}}@endif" placeholder="任意时间">
                                </div>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">N天外</label>
                            <div class="layui-input-inline" id="N-date-out" style="width: 200px;">
                                <div class="layui-input-inline layui-input-wrap">
                                    <input disabled type="number" step="1" min="0" max="365" name="endSaleDay" value="@if(empty($policy['endSaleDay'])){{0}}@elseif(!empty($policy['endSaleDay'])){{$policy['endSaleDay']}}@endif" required
                                           placeholder="" lay-affix="number" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-mid" style="left: 0px;color: #000;padding: 8px 0 !important;margin-right:3px">天</div>
                            <div class="layui-input-inline" style="width: 200px;">
                                <div class="layui-input-inline layui-input-wrap">
                                    <div class="layui-input-prefix">
                                        <i class="layui-icon layui-icon-time"></i>
                                    </div>
                                    <input disabled type="text" class="layui-input" id="NDateOutTime" name="endSaleTime" value="@if(empty($policy['endSaleTime'])){{'00:00'}}@elseif(!empty($policy['endSaleTime'])){{$policy['endSaleTime']}}@endif" placeholder="任意时间">
                                </div>
                            </div>
                        </div>

                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">销售适用时间</label>
                            <div class="layui-input-inline" style="width: 280px;padding-bottom: 8px">
                                <textarea disabled placeholder="请输入销售适用时间，格式：00:00-10:00,12:00-20:00" rows="" maxlength="" class="layui-textarea" style="" lay-verify="" lay-reqText="" name="saleApplyTimeRangeSegment">@if(!empty($policy['startSaleTime']) && !empty($policy['startSaleTime'] != '00:00') && !empty($policy['endSaleTime']) && !empty($policy['endSaleTime'] != '00:00')){{$policy['startSaleTime']}}{{'-'}}{{$policy['endSaleTime']}}@endif</textarea>
                            </div>
                        </div>

                    </div>
                    <!--价格信息-->
                    <div class="piece">
                        <div class="split-text">价格信息</div>
                        <hr>
                        <div class="layui-form-item" id="adultRebateDiv">
                            <label class="layui-form-label">成人返点</label>
                            <div class="layui-input-inline" id="addSub" style="width: 200px;">
                                <div class="layui-input-inline layui-input-wrap">
                                    <input type="text" step="1" min="0" name="adultRebatePercent" value="{{$policy['adultRebatePercent']}}" required
                                           onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,1})?).*$/g, '$1')" placeholder="" lay-verify="float" lay-affix="number" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-mid" style="left: 0px;color: #000;padding: 8px 0 !important;margin-right:3px">%</div>
                            <div class="layui-input-inline" style="width: 200px;">
                                <div class="layui-input-inline layui-input-wrap">
                                    <input type="text" step="1" min="0" name="adultRebateMoney" value="{{$policy['adultRebateMoney']}}" required
                                           onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" placeholder="" lay-verify="float" lay-affix="number" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-mid" style="left: 0px;color: #000;padding: 8px 0 !important;margin-right:3px">元</div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">儿童返点</label>
                            <div class="layui-input-inline" id="addSub" style="width: 200px;">
                                <div class="layui-input-inline layui-input-wrap">
                                    <input type="text" step="1" min="0" name="childRebatePercent" value="{{$policy['childRebatePercent']}}" required
                                           onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,1})?).*$/g, '$1')" placeholder="" lay-verify="float" lay-affix="number" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-mid" style="left: 0px;color: #000;padding: 8px 0 !important;margin-right:3px">%</div>
                            <div class="layui-input-inline" style="width: 200px;">
                                <div class="layui-input-inline layui-input-wrap">
                                    <input type="text" step="1" min="0" name="childRebateMoney" value="{{$policy['childRebateMoney']}}" required
                                           onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" placeholder="" lay-verify="float" lay-affix="number" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-mid" style="left: 0px;color: #000;padding: 8px 0 !important;margin-right:3px">元</div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">竞价砝码</label>
                            <div class="layui-input-inline" id="addSub" style="width: 200px;">
                                <div class="layui-input-inline layui-input-wrap">
                                    <input type="text" step="1" min="0" name="keepMoneyPercent" value="@if(empty($policy['keepMoneyPercent'])){{number_format('0.00', 2, '.', '')}}@elseif(!empty($policy['keepMoneyPercent'])){{$policy['keepMoneyPercent']}}@endif" required
                                           onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" placeholder="" lay-verify="float" lay-affix="number" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-mid" style="left: 0px;color: #000;padding: 8px 0 !important;margin-right:3px">%</div>
                            <div class="layui-input-inline" style="width: 200px;">
                                <div class="layui-input-inline layui-input-wrap">
                                    <input type="text" step="1" min="0" name="keepMoney" value="@if(empty($policy['keepMoney'])){{number_format('0.00', 2, '.', '')}}@elseif(!empty($policy['keepMoney'])){{$policy['keepMoney']}}@endif" required
                                           onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" placeholder="" lay-verify="float" lay-affix="number" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-mid" style="left: 0px;color: #000;padding: 8px 0 !important;margin-right:3px">元</div>
                        </div>
                    </div>

                    <!--库存信息-->
                    <div class="piece">
                        <div class="split-text">库存信息</div>
                        <hr>
                        <div class="layui-form-item">
                            <label class="layui-form-label layui-required">库存类型</label>
                            <div class="layui-input-block">
                                <input disabled type="radio" name="sellType" value="1" @if($policy['sellType'] == 1) checked @endif title="AV有座时销售" lay-filter="sellType">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">总库存数</label>
                            <div class="layui-col-md3">
                                <input disabled type="text" step="1" min="0" name="everydayInventory" value="{{$policy['everydayInventory']}}" required
                                       placeholder="" lay-verify="number"  lay-affix="number" autocomplete="off" class="layui-input">
                            </div>
                        </div>

                    </div>
                    <!--出票信息-->
                    <div class="piece">
                        <div class="split-text">出票信息</div>
                        <hr>
                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">备注信息</label>
                            <div class="layui-input-inline" style="width: 280px;margin-bottom: 15px">
                                <textarea disabled placeholder="请输入备注" rows="" class="layui-textarea" style="" lay-verify="" lay-reqText="" name="remark">{{$policy['remark']}}</textarea>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-row layui-col-space10" style="margin-top: 30px">
            <div class="layui-col-md9">
                <div class="grid-demo grid-demo-bg1"></div>
            </div>
            <div class="layui-col-md3">
                <div class="grid-demo">
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" lay-submit lay-filter="*">立即提交</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </form>
@endsection
@push('script')
    <script src="/static/js/tccommonpolicy/tccommon.js?version={{env('JS_VERSION')}}"></script>
    <script src="/static/xml-select/xm-select.js?version={{env('JS_VERSION')}}"></script>
    <script>
        layui.use(['form','layer'], function () {

            var $ = layui.$
                , form = layui.form
                ,layer = layui.layer;

            // layer.tips('这里是弹出的文本', '.split-text');

            //监听提交
            form.on('submit(*)', function (data) {

                $.ajax({
                    url: '/tccommonpolicy/ajaxUpdate'
                    , method: 'put'
                    , data: data.field
                    , dataType: 'json'
                    , success: function (data) {

                        layer.msg(data.errmsg, {
                            offset: '15px'
                            , icon: (data.errcode == 0 ? 1 : 5)
                            , time: 3000
                        }, function () {
                        });
                    },
                });

                return false;
            });

            var source_type = xmSelect.render({
                el: '#resourceApplySceneList',
                language: 'zn',
                name: 'resourceApplySceneList',
                theme: {
                    color: '#666', // 设置主题颜色
                },
                data: [
                    {name: '独享假联程', value: '4' @if(!empty($policy['resourceApplySceneList']) && in_array(4, $policy['resourceApplySceneList'])), selected: true @endif},
                    {name: '拼接假联程', value: '11' @if(!empty($policy['resourceApplySceneList']) && in_array(11, $policy['resourceApplySceneList'])) , selected: true @endif}
                ]
            });

        })
    </script>
@endpush